package com.jianganming.observer.demo2;

public class Test {

    public static void main(String[] args) {
        Teacher teacher = new Teacher("李老师","同学们开始上课了");

        Student student = new Student("小明");
        Student student1 = new Student("小华");
        Student student2 = new Student("小兰");

        teacher.add(student);
        teacher.add(student1);
        teacher.add(student2);

        teacher.notifyObserver(teacher);
    }
}
